package com.ruoyi.configuration.controller;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.configuration.service.impl.DashboardServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dashboard")
public class DashboardController {
    @Autowired
    private DashboardServiceImpl dashboardServiceImpl;

    /**
     * 折线图
     * @param reqD
     * @return
     */
    @RequestMapping("data")
    public AjaxResult getData(DashboardServiceImpl.ReqD reqD) {
        return AjaxResult.success(dashboardServiceImpl.getData(reqD));
    }
    
    /**
     * 订单数据处理 饼图
     * @param reqD
     * @return
     */
    @RequestMapping("data2")
    public AjaxResult getData2(DashboardServiceImpl.ReqD reqD) {
        return dashboardServiceImpl.getData2(reqD);
    }

    /**
     * 数据页面最上面的数据
     * @param reqD
     * @return
     */
    @RequestMapping("data3")
    public AjaxResult getData3(DashboardServiceImpl.ReqD reqD) {
        return dashboardServiceImpl.getData3(reqD);
    }
}
